From: Jo-Philipp Wich Date: Tue, 26 Jun 2018 13:24:16 +0000 (+0200) Subject: luci-mod-admin-full: fix possible switch status layout bug X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=60c5d15e9eb46016bba7383b103cf95ebb997886;p=project%2Fluci.git luci-mod-admin-full: fix possible switch status layout bug In some cases we might get status information for more ports than which are actually usable, prevent overflowing the port status row in this case. Reported-at: https://forum.lede-project.org/t/x/15897/14 Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm index d3d07bead9..8a42a117e1 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm @@ -35,7 +35,7 @@ { var th = tr.childNodes[j+1]; - if (!th) + if (!th || !th.hasAttribute('data-name')) continue; if (ports[j].link)